<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <button onClick="toConsult()">发起咨询</button> 
    </div>
    <script src="dist/sdk.bundle.js"></script>
    <script>
        YJSDK.config({
            env:'test',   //test pre prod
            idPi:"ff8080816e590c3e016e593015d80039",   //传idPi或者token,传idpi会调用获取token,用于请求头添加token
            consult:{
                chatType:"",  //聊天类型 1：单聊 2：群聊
                idPi: "ff8080816e590c3e016e593015d80039",  // ff8080816e590c3e016e593015d80039  ff808081767420550176744eacea006f
                sysUserId: "5ed5bc1fb496b641b4a09768",// 医生id  5ed5bc1fb496b641b4a09768  609cbda715b2490aa2d0d9e1
                userType:"1",  //发起会话方式 1：用户发起  2：医生发起
            }
        })
        function toConsult(){
            YJSDK.consult.startConsult()
        }
        //YJSDK.consult.checkConsult()
    </script>
</body>
</html>